package cn.dansj.handler.interfaces;

import cn.dansj.annotation.MarkAsApi;
import cn.dansj.bean.CurrentThreadLocalUserInfo;
import cn.dansj.handler.InterfaceHandler;

import java.util.Collections;
import java.util.Map;

@SuppressWarnings("all")
@MarkAsApi
public class ClearVerificationCode extends InterfaceHandler {
    @Override
    public Object execute(Map<String, Object> paramsMap) {
        String key = "verificationCode@" + CurrentThreadLocalUserInfo.getCurrentThreadLocalUserInfo().getCacheToken().getUsername();
        return Collections.singletonMap("status", redisUtils.delete(key));
    }
}
